package com.game.my.model;

import java.util.List;

import com.eova.common.base.BaseModel;

public class Account extends BaseModel<Account> {
	/**
	 * TODO（用一句话描述这个变量表示什么）
	 */

	private static final long serialVersionUID = 1L;

	public static final Account dao = new Account();

	public Account getAcount(Long userId) {
		StringBuffer sql = new StringBuffer();
		sql.append("SELECT userId,balance,totalExpenses,totalWithdraw,withdrawMoney,withdrawTime,rechargeMoney,rechargeTime,accountFlag");
		sql.append(" FROM user_account_info where userId=? order by createTime desc limit 0,1  ");
		return this.findFirst(sql.toString(), userId);
	}

	public List<Account> AccountList(Object openId) {
		StringBuffer sql = new StringBuffer();
		sql.append("SELECT id,userId,balance,totalExpenses,totalWithdraw,withdrawMoney,withdrawTime,rechargeMoney,rechargeTime,accountFlag");
		sql.append(" FROM user_account_info where userId=?");
		return this.find(sql.toString(), openId);
	}

}
